import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/page/index'
import Login from '@/page/login'
import PublisherEdit from '@/page/timecoin/publisher/edit.vue'

Vue.use(Router)

export default new Router({
  base: '/',
  mode: 'history',
  transitionOnLoad: true,
  routes: [
    {
      path: '/',
      name: 'home',
      component: Home,
      meta: { requireAuth: true, singlePage: false, keepAlive: true }

    },
    {
      path: '/login',
      name: 'login',
      component: Login,
      meta: { requireAuth: false, singlePage: true, keepAlive: false }

    },
    {
      path: '/timecoin/publisher/index',
      name: 'timecoin-publisher-index',
      component: (resolve) => require(['@/page/timecoin/publisher/index.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }

    },
    {
      path: '/timecoin/publisher/edit/:id',
      name: 'timecoin-publisher-edit',
      component: PublisherEdit,
      meta: { requireAuth: true, singlePage: false, keepAlive: true }

    },
    {
      path: '/timecoin/publisher/create',
      name: 'timecoin-publisher-create',
      component: (resolve) => require(['@/page/timecoin/publisher/create.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }

    },
    {
      path: '/images/picture/index',
      name: 'image-picture-index',
      component: (resolve) => require(['@/page/images/picture/index.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }

    },
    {
      path: '/cms/article/edit/:id',
      name: 'cms-article-edit',
      component: (resolve) => require(['@/page/cms/article/edit.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }

    },
    {
      path: '/cms/article/index',
      name: 'cms-article-index',
      component: (resolve) => require(['@/page/cms/article/index.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }

    },
    {
      path: '/cms/article/create',
      name: 'cms-article-create',
      component: (resolve) => require(['@/page/cms/article/create.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }
    },
    {
      path: '/cms/comment/edit/:id',
      name: 'cms-comment-edit',
      component: (resolve) => require(['@/page/cms/comment/edit.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }

    },
    {
      path: '/cms/comment/index',
      name: 'cms-comment-index',
      component: (resolve) => require(['@/page/cms/comment/index.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }

    },
    {
      path: '/cms/comment/create',
      name: 'cms-comment-create',
      component: (resolve) => require(['@/page/cms/comment/create.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }
    },
    {
      path: '/welisten/listener/edit/:id',
      name: 'welisten-listener-edit',
      component: (resolve) => require(['@/page/welisten/listener/edit.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }

    },
    {
      path: '/welisten/listener/index',
      name: 'welisten-listener-index',
      component: (resolve) => require(['@/page/welisten/listener/index.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }

    },
    {
      path: '/welisten/listener/create',
      name: 'welisten-listener-create',
      component: (resolve) => require(['@/page/welisten/listener/create.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }
    },
    {
      path: '/welisten/product/index',
      name: 'welisten-product-index',
      component: (resolve) => require(['@/page/welisten/product/index.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }
    },
    {
      path: '/welisten/product/create',
      name: 'welisten-product-create',
      component: (resolve) => require(['@/page/welisten/product/create.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }
    },
    {
      path: '/welisten/product/edit/:id',
      name: 'welisten-product-edit',
      component: (resolve) => require(['@/page/welisten/product/edit.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }
    },
    {
      path: '/wallet/account/index',
      name: 'wallet-account-index',
      component: (resolve) => require(['@/page/wallet/account/index.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }
    },
    {
      path: '/wallet/account/create',
      name: 'wallet-account-create',
      component: (resolve) => require(['@/page/wallet/account/create.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }
    },
    {
      path: '/wallet/account/edit/:id',
      name: 'wallet-account-edit',
      component: (resolve) => require(['@/page/wallet/account/edit.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }
    },
    {
      path: '/wallet/recharge/index',
      name: 'wallet-recharge-index',
      component: (resolve) => require(['@/page/wallet/recharge/index.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }
    },
    {
      path: '/wallet/recharge/create',
      name: 'wallet-recharge-create',
      component: (resolve) => require(['@/page/wallet/recharge/create.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }
    },
    {
      path: '/wallet/recharge/edit/:id',
      name: 'wallet-recharge-edit',
      component: (resolve) => require(['@/page/wallet/recharge/edit.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }
    },
    {
      path: '/wallet/cash/index',
      name: 'wallet-cash-index',
      component: (resolve) => require(['@/page/wallet/cash/index.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }
    },
    {
      path: '/wallet/cash/create',
      name: 'wallet-cash-create',
      component: (resolve) => require(['@/page/wallet/cash/create.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }
    },
    {
      path: '/wallet/cash/edit/:id',
      name: 'wallet-cash-edit',
      component: (resolve) => require(['@/page/wallet/cash/edit.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }
    },
    {
      path: '/welisten/talk/index',
      name: 'welisten-talk-index',
      component: (resolve) => require(['@/page/welisten/talk/index.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }
    },
    {
      path: '/welisten/talk/comment/index',
      name: 'welisten-talk-comment-index',
      component: (resolve) => require(['@/page/welisten/talkcomment/index.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }
    },
    {
      path: '/welisten/help/comment/index',
      name: 'welisten-help-comment-index',
      component: (resolve) => require(['@/page/welisten/helpcomment/index.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }
    },
    {
      path: '/welisten/talk/create',
      name: 'welisten-talk-create',
      component: (resolve) => require(['@/page/welisten/talk/create.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }
    },
    {
      path: '/welisten/talk/edit/:id',
      name: 'welisten-talk-edit',
      component: (resolve) => require(['@/page/welisten/talk/edit.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }
    },
    {
      path: '/welisten/help/index',
      name: 'welisten-help-index',
      component: (resolve) => require(['@/page/welisten/help/index.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }
    },
    {
      path: '/welisten/help/create',
      name: 'welisten-help-create',
      component: (resolve) => require(['@/page/welisten/help/create.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }
    },
    {
      path: '/welisten/help/edit/:id',
      name: 'welisten-help-edit',
      component: (resolve) => require(['@/page/welisten/help/edit.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }
    },
    {
      path: '/welisten/order/index',
      name: 'welisten-order-index',
      component: (resolve) => require(['@/page/welisten/order/index.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }
    },
    {
      path: '/welisten/order/create',
      name: 'welisten-order-create',
      component: (resolve) => require(['@/page/welisten/order/create.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }
    },
    {
      path: '/welisten/order/edit/:id',
      name: 'welisten-order-edit',
      component: (resolve) => require(['@/page/welisten/order/edit.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }
    },
    {
      path: '/communication/sms/index',
      name: 'communication-sms-index',
      component: (resolve) => require(['@/page/communication/sms/index.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }
    },
    {
      path: '/communication/sms/create',
      name: 'communication-sms-create',
      component: (resolve) => require(['@/page/communication/sms/create.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }
    },
    {
      path: '/communication/sms/edit/:id',
      name: 'communication-sms-edit',
      component: (resolve) => require(['@/page/communication/sms/edit.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }
    },

    {
      path: '/communication/remind/index',
      name: 'communication-remind-index',
      component: (resolve) => require(['@/page/communication/remind/index.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }
    },
    {
      path: '/communication/remind/create',
      name: 'communication-remind-create',
      component: (resolve) => require(['@/page/communication/remind/create.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }
    },
    {
      path: '/communication/remind/edit/:id',
      name: 'communication-remind-edit',
      component: (resolve) => require(['@/page/communication/remind/edit.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }
    },
    {
      path: '/welisten/listener/apply',
      name: 'welisten-listener-apply',
      component: (resolve) => require(['@/page/welisten/listener/apply.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }

    },
    {
      path: '/welisten/listener/apply_detail/:id',
      name: 'welisten-listener-apply_detail',
      component: (resolve) => require(['@/page/welisten/listener/apply_detail.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }

    },
    {
      path: '/promotion/template/index',
      name: 'promotion-template-index',
      component: (resolve) => require(['@/page/promotion/template/index.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }

    },
    {
      path: '/promotion/template/create',
      name: 'promotion-template-create',
      component: (resolve) => require(['@/page/promotion/template/create.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }

    },
    {
      path: '/promotion/template/edit/:id',
      name: 'promotion-template-edit',
      component: (resolve) => require(['@/page/promotion/template/edit.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }

    },
    {
      path: '/setting/system/index',
      name: 'setting-system-index',
      component: (resolve) => require(['@/page/setting/system/index.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }
    },
    {
      path: '/setting/basic/index',
      name: 'setting-basic-index',
      component: (resolve) => require(['@/page/setting/basic/index.vue'], resolve),
      meta: { requireAuth: true, singlePage: false, keepAlive: true }
    },


  ]
})
